package homework03;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        list.add(10);
        list.add(20);
        list.add(30);

        Integer num=10;

        System.out.println(listTest(list,num));
    }


    public static int listTest(ArrayList<Integer>list,Integer num){
        for (int i = 0; i < list.size(); i++) {
            if (num.equals(list.get(i))){
                return i;
            }

            }
                 return -1;
        }
    }

